﻿using DotNet.HowToUseInterfacesDemo.GoodUse.Repositories;
using DotNet.HowToUseInterfacesDemo.GoodUse.Services;

namespace DotNet.HowToUseInterfacesDemo.GoodUse.Config
{
    /// <summary>
    /// 
    /// </summary>
    class DependencyInjectionConfig : ObjectFactoryModule
    {
        public override void Load()
        {
            //Repositories
            Bind<IPersonRepository>().To<PersonRepository>().InSingletonScope();

            //Services
            Bind<IMessengerSenderService>().To<EmailMessengerService>();
            Bind<IMessengerSenderService>().To<TextMessageMessengerService>();

            Bind<IMessengerService>().To<MessengerService>();
        }
    }
}
